package cn.dkdoo.utils.common;

import cn.dkdoo.utils.config.transactionInfo.TransactionInfoManager;
import cn.dkdoo.utils.config.traNo.TraNoManager;

/**
 * @author nicky
 * @date 2021/5/11 上午11:09
 */
public class ThreadLocalPool {
    public static final TraNoManager TRA_NO_MANAGER = new TraNoManager();
    public static final TransactionInfoManager TRAINFO_MANAGER = new TransactionInfoManager();

    public static void releaseToThread(ThreadLocalAbstract... threadLocalAbstracts) {
        if (threadLocalAbstracts == null || threadLocalAbstracts.length == 0) {
            return;
        }
        for (ThreadLocalAbstract threadLocalAbstract : threadLocalAbstracts) {
            threadLocalAbstract.releaseToThread();
        }
    }
}
